package com.example.myshop.service;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.stereotype.Service;
import org.springframework.test.context.junit4.SpringRunner;

@SpringBootTest
@RunWith(SpringRunner.class)
@Service
public class cartservicetest {
    @Autowired
    private CartService cartService;
    @Test
    public void addnumtest(){
        cartService.addNum(1L,1L,"test");
    }
    @Test
    public void reducenumtest(){
        cartService.reduceNum(1L,1L,"test");
    }
    @Test
    public void getvo(){
        Long[] cids={1L,2L,3L};
        cartService.getVOByCid(1L,cids);
    }

}
